<?php

function writeLog($conn, $userid, $mess){
    $sql = "insert into log (user_id, mess, time) values('$userid','$mess','".date('m/d/Y h:i:s a', time())."')";
    
    $error = mysqli_query($conn, $sql);
    echo date('m/d/Y h:i:s a', time());
}
?>
